package com.example.newproject_overseas.Screen


import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import com.example.newproject_overseas.R
import com.example.newproject_overseas.components.TopApp

@Composable
fun AskQuestions(navController: NavHostController) {
    Column(
        modifier = Modifier
            .fillMaxSize()
            .background(color = Color(0XFFEFF0F3)),
    ) {
        //导航1
        TopApp(title = "Ask questions", navController = navController)
        //为空展示
        Box(modifier = Modifier
            .fillMaxSize(),
            contentAlignment = Alignment.Center) {
            Image(painter = painterResource(id = R.drawable.msg), contentDescription = "空数据",
                modifier = Modifier
                    .width(360.dp)
                    .height(461.dp))

            //底部按钮
            Button(onClick = { /*TODO*/ }, modifier = Modifier
                .fillMaxWidth(1f)
                .height(44.dp)
                .align(Alignment.BottomCenter),
                colors = ButtonDefaults.buttonColors(Color(0xFFFFCC00)),
                shape = RoundedCornerShape(4.5.dp)) {
                Text(
                    modifier = Modifier,
                    text = "Submit",
                    color = Color(0xFFFFFFFF),
                    fontSize = 20.sp
                )
            }
        }
        //确定按钮

    }
}

@Preview
@Composable
fun AskQuestionsPreview() {
    val navController = rememberNavController()
    AskQuestions(navController)
}

